home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 199 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: line070.nwm.mindlink.net!jason_gredley
  2. From: jason_gredley@mindlink.bc.ca (Jason Gredley)
  3. Newsgroups: comp.lang.c
  4. Subject: Prototypes
  5. Date: Wed, 3 Jan 1996 07:42:42 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <jason_gredley.5.30EA3371@mindlink.bc.ca>
  8. NNTP-Posting-Host: line070.nwm.mindlink.net
  9. Keywords: prototype
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]
  11.  
  12.     Formerly I have been programing in C++.  Recently however I thought I 
  13. should at least do a few programs in C, if for nothing else, ability to say 
  14. that I can program in C.  Normally in C++ I would include appropriate header 
  15. files and then at any point be free to call those functions included in that 
  16. header file.  However when compiling a C program the compiler is generating a 
  17. zillion _warnings_ of "call to function with no prototype".  Looking at C 
  18. example programs, etc it seems customary to identify prototypes at the top of 
  19. a module as well as including header files (this seems redundant).  I am even 
  20. getting the same warning about calling strcpy (a library function) after 
  21. including the "string.h" header; am I suppose to have prototypes for every 
  22. function I call?  At present I am not bothering to have prototypes at the 
  23. beginning of my program modules but am including header files (my program is 
  24. not exhibiting problems of any sort).  I want to know specifically if there 
  25. is any reason that I should have these prototypes in each module or at least 
  26. what the signifigance this has to a C program and why it has none to C++.
  27.  
  28. Thanx ... Jason
  29.